const {getRent3,getRentOut3,getRentStatus,getAll3,getByCd,add3} = require('../database/dao/comments');

module.exports.getRent2 = async function ({status}){
    if(status === ''){
        return await getRent3();
    }else{
        return await getRentStatus({status});
    }
    
};

module.exports.add2 = async function(data){
    return await add3(data)
}


module.exports.getRentOut2 = async function(){
    return await getRentOut3();
}

module.exports.getAll2 = async function({status,userId,orderId}){
    if(orderId){
        return await getByCd({status,userId,orderId});
    }else{
        return await getAll3();
    }
}

